Skip to content

fix(core,graph): batch validation, live HNSW identities, generated IDs, replacement indexes - #1435

Merged
ruvnet merged 4 commits into
ruvnet:mainfrom
rudycelekli:fix/core-graph-consolidated
Nov 10, 2026
Merged

ruvnet merged 4 commits into
ruvnet:mainfrom
rudycelekli:fix/core-graph-consolidated

Conversation

@rudycelekli

Copy link
Copy Markdown
Contributor

Summary

One PR for the core and graph fixes, rebased on current main (including the HNSW changes from #1368 and #1299).

Closes #1160, #1161, #1167, #1174.

Test plan

  • cargo test -p ruvector-core --test memory_batch_validation --test hnsw_live_replacements --test memory_generated_ids
  • cargo test -p ruvector-graph --test node_replacement_indexes

Made with Cursor

@ruvnet
ruvnet force-pushed the fix/core-graph-consolidated branch from af54324 to 7c2d289 Compare November 10, 2026 00:37
@ruvnet

ruvnet commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Thanks @rudycelekli. This conflicted with #1443 (merged today, b59a81a), which landed the same upsert fix in HnswIndex::add / add_batch: when an id is re-added, its previous graph node's reverse mapping is dropped, so it becomes a tombstone. Both branches wrote that fix; only the variable name differed (old vs previous_idx).

You allow maintainer edits and the conflict was mechanical, so I rebased your four commits onto current main and force-pushed (with lease) to fix/core-graph-consolidated. Authorship is unchanged. Resolution:

  • crates/ruvector-core/src/index/hnsw.rs: kept main's naming in the two conflicting hunks. Your hnsw.rs delta against main is now only the restore-path change, which rebuilds idx_to_id from each live id's current position so legacy snapshots don't resurrect replaced versions.
  • No other files conflicted.

Locally on the rebased head (7c2d289): cargo test -p ruvector-core -p ruvector-graph passes in every suite, cargo check -p ruvector-py is clean, and cargo fmt --check is clean. CI will run on the new head. If you'd rather rebase differently, feel free to force-push over it.

@ruvnet
ruvnet merged commit 17489ed into ruvnet:main Nov 10, 2026
71 checks passed
@ruvnet

ruvnet commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Merged as 17489ed after a green CI run on the rebased head. Thanks @rudycelekli!

vitaly-z pushed a commit to vitaly-z/ruvector that referenced this pull request Nov 11, 2026
…edge deletes

Port of ruvnet#375 onto main after ruvnet#1435.

ruvector-sona: `MicroLoRA::set_weights` now rejects NaN/Inf in either
projection before mutating state, so loading corrupt weights from disk or
another system cannot poison the adapter. Adds tests for NaN/Inf in each
projection and for state preservation on a failed load; the new doc example
imports `ruvector_sona::MicroLoRA` so it compiles as a doctest.

ruvector-graph: `delete_edge` and `delete_edges_batch` persisted the deletion
after removing the edge from memory and indexes, so a storage error left
memory and disk disagreeing. Both now persist first and only then mutate
memory and indexes. `delete_edge` holds the DashMap entry across the storage
call, matching how ruvnet#1435 made `create_edge` disk-first; the batch path drops
exactly the removed values from the indexes. ruvnet#375's `create_edge` hunk is
dropped because ruvnet#1435 already landed the same ordering. Adds a test that
single and batch deletes (with missing and repeated IDs) leave no type or
adjacency membership behind.

Co-Authored-By: kiki-kanri <a470666@gmail.com>
Co-Authored-By: claude-flow <ruv@ruv.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants